<template>
  <div>
   <div >

     房子详情
    <div v-for=" item in listImg" :key="item.id">
       <img :src="'http://www.xiaoshuaipeng.com:8080' + item" alt="">
    </div>
    <div>{{ list.title}}</div>
    <p>111</p>
    <!-- <p>{{ list.tags[0]}}</p> -->
    <span>{{ list.price}}/月</span> <span>{{ list.roomType}}</span> <span>{{ list.size}}平米</span>
     <br> <span>租金</span>  <span>房型</span>   <span>面积</span>
     <div>
      <!-- <i>{{ list.oriented[0]}}</i> <br> -->
      <i>{{ list.floor}}</i>
  
     </div>
     <p> {{ list.community}}</p>

   </div>
  </div>
</template>

<script>
import axios from "axios";
export default {
  data() {
    return {
      list:'',
      listImg:[]
    };
  },
  async created() {
    const id = this.$route.params.id;
    console.log(id);

    const { data } = await axios.get(
      `http://www.xiaoshuaipeng.com:8080/houses/${id}`
    );
    console.log(data.body);
    console.log(data.body.houseImg)
    this.list = data.body
    this.listImg = data.body.houseImg
  },
};
</script>

<style scoped>
img {
width: 100%;
/* height: 300px; */
}
</style>